home *** CD-ROM | disk | FTP | other *** search
- head 1.1;
- access;
- symbols;
- locks
- dglattin:1.1; strict;
- comment @# @;
-
-
- 1.1
- date 92.08.18.04.58.04; author dglattin; state Exp;
- branches;
- next ;
-
-
- desc
- @test code.
- @
-
-
- 1.1
- log
- @Initial revision
- @
- text
- @#include <Object.h>
- #include <stdio.h>
-
-
- @@interface SubClass1 : Object {}
- + ( int )return12;
- - ( int )return15;
- @@end
-
- @@implementation SubClass1
- + ( int )return12 { return 12; }
- - ( int )return15 { return 15; }
- @@end
-
-
-
- @@interface SubClass4 : SubClass1 {}
- + ( int )return12;
- - ( int )return15;
- @@end
-
- @@implementation SubClass4
- + ( int )return12 {
-
- /* Due to compiler design,
- this should not be a infinite loop. */
- [ SubClass1 new ];
- [ SubClass4 new ];
- return [ super return12 ] + 1 ;
- }
-
-
- - ( int )return15 {
-
-
- [ SubClass1 new ]; /* Due to compiler design,
- this should not be a infinite loop. */
- return [ super return15 ];
- }
- @@end
-
-
-
- void main (void) {
-
-
- [ SubClass4 poseAs:[ SubClass1 class ]];
- printf ("%d\n", [ SubClass4 return12 ]);
- }@
-